<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Irrlicht 3D Engine: irr::video::IMaterialRendererServices Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="irrlichtlogo.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Irrlicht 3D Engine
   
   </div>
   
  </td>
  
  
  
   
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="dynsections.js"></script>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('classirr_1_1video_1_1_i_material_renderer_services.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">irr::video::IMaterialRendererServices Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="irr::video::IMaterialRendererServices" -->
<p>Interface providing some methods for changing advanced, internal states of a <a class="el" href="classirr_1_1video_1_1_i_video_driver.html" title="Interface to driver which is able to perform 2d and 3d graphics functions.">IVideoDriver</a>.  
 <a href="classirr_1_1video_1_1_i_material_renderer_services.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_i_material_renderer_services_8h_source.html">IMaterialRendererServices.h</a>&gt;</code></p>

<p><a href="classirr_1_1video_1_1_i_material_renderer_services-members.html">List of all members.</a></p>
<h2><a name="pub-methods"></a>
Public Member Functions</h2>
<ul>
<li>virtual <a class="el" href="classirr_1_1video_1_1_i_material_renderer_services.html#abbab02366d5303f106d14278bf88aff3">~IMaterialRendererServices</a> ()
<dl class="el"><dd class="mdescRight">Destructor.  <a href="#abbab02366d5303f106d14278bf88aff3"></a><br/></dl><li>virtual <a class="el" href="classirr_1_1video_1_1_i_video_driver.html">IVideoDriver</a> * <a class="el" href="classirr_1_1video_1_1_i_material_renderer_services.html#a2a80795887e43cb743eb5ee82604d4cf">getVideoDriver</a> ()=0
<dl class="el"><dd class="mdescRight">Get pointer to the <a class="el" href="classirr_1_1video_1_1_i_video_driver.html" title="Interface to driver which is able to perform 2d and 3d graphics functions.">IVideoDriver</a> interface.  <a href="#a2a80795887e43cb743eb5ee82604d4cf"></a><br/></dl><li>virtual void <a class="el" href="classirr_1_1video_1_1_i_material_renderer_services.html#ab000e24fe3f65fb63b007a37895df3f2">setBasicRenderStates</a> (const <a class="el" href="classirr_1_1video_1_1_s_material.html">SMaterial</a> &amp;material, const <a class="el" href="classirr_1_1video_1_1_s_material.html">SMaterial</a> &amp;lastMaterial, bool resetAllRenderstates)=0
<dl class="el"><dd class="mdescRight">Can be called by an <a class="el" href="classirr_1_1video_1_1_i_material_renderer.html" title="Interface for material rendering.">IMaterialRenderer</a> to make its work easier.  <a href="#ab000e24fe3f65fb63b007a37895df3f2"></a><br/></dl><li>virtual bool <a class="el" href="classirr_1_1video_1_1_i_material_renderer_services.html#a6f612293300f643148bd537a8a70ff32">setPixelShaderConstant</a> (const <a class="el" href="namespaceirr.html#a9395eaea339bcb546b319e9c96bf7410">c8</a> *name, const <a class="el" href="namespaceirr.html#a0277be98d67dc26ff93b1a6a1d086b07">f32</a> *floats, int count)=0
<dl class="el"><dd class="mdescRight">Sets a constant for the pixel shader based on a name.  <a href="#a6f612293300f643148bd537a8a70ff32"></a><br/></dl><li>virtual bool <a class="el" href="classirr_1_1video_1_1_i_material_renderer_services.html#a252ccc1a6055f784c252435e1427de1b">setPixelShaderConstant</a> (const <a class="el" href="namespaceirr.html#a9395eaea339bcb546b319e9c96bf7410">c8</a> *name, const bool *bools, int count)=0
<dl class="el"><dd class="mdescRight">Bool interface for the above.  <a href="#a252ccc1a6055f784c252435e1427de1b"></a><br/></dl><li>virtual bool <a class="el" href="classirr_1_1video_1_1_i_material_renderer_services.html#ac81171c7c59a9cf0fc7d76de910098f4">setPixelShaderConstant</a> (const <a class="el" href="namespaceirr.html#a9395eaea339bcb546b319e9c96bf7410">c8</a> *name, const <a class="el" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6">s32</a> *ints, int count)=0
<dl class="el"><dd class="mdescRight">Int interface for the above.  <a href="#ac81171c7c59a9cf0fc7d76de910098f4"></a><br/></dl><li>virtual void <a class="el" href="classirr_1_1video_1_1_i_material_renderer_services.html#af962cb878f57d1edbc0030fedb464d1d">setPixelShaderConstant</a> (const <a class="el" href="namespaceirr.html#a0277be98d67dc26ff93b1a6a1d086b07">f32</a> *data, <a class="el" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6">s32</a> startRegister, <a class="el" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6">s32</a> constantAmount=1)=0
<dl class="el"><dd class="mdescRight">Sets a pixel shader constant.  <a href="#af962cb878f57d1edbc0030fedb464d1d"></a><br/></dl><li>virtual bool <a class="el" href="classirr_1_1video_1_1_i_material_renderer_services.html#a294db14b4f3608d29d0e457246df3d16">setVertexShaderConstant</a> (const <a class="el" href="namespaceirr.html#a9395eaea339bcb546b319e9c96bf7410">c8</a> *name, const <a class="el" href="namespaceirr.html#a0277be98d67dc26ff93b1a6a1d086b07">f32</a> *floats, int count)=0
<dl class="el"><dd class="mdescRight">Sets a constant for the vertex shader based on a name.  <a href="#a294db14b4f3608d29d0e457246df3d16"></a><br/></dl><li>virtual bool <a class="el" href="classirr_1_1video_1_1_i_material_renderer_services.html#aed8c3f830451ec416265202d2dc90f92">setVertexShaderConstant</a> (const <a class="el" href="namespaceirr.html#a9395eaea339bcb546b319e9c96bf7410">c8</a> *name, const bool *bools, int count)=0
<dl class="el"><dd class="mdescRight">Bool interface for the above.  <a href="#aed8c3f830451ec416265202d2dc90f92"></a><br/></dl><li>virtual bool <a class="el" href="classirr_1_1video_1_1_i_material_renderer_services.html#a4dc7be8f9a786b9805c46f535ff7d896">setVertexShaderConstant</a> (const <a class="el" href="namespaceirr.html#a9395eaea339bcb546b319e9c96bf7410">c8</a> *name, const <a class="el" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6">s32</a> *ints, int count)=0
<dl class="el"><dd class="mdescRight">Int interface for the above.  <a href="#a4dc7be8f9a786b9805c46f535ff7d896"></a><br/></dl><li>virtual void <a class="el" href="classirr_1_1video_1_1_i_material_renderer_services.html#a1f11a6df7625205511e91fb036e03929">setVertexShaderConstant</a> (const <a class="el" href="namespaceirr.html#a0277be98d67dc26ff93b1a6a1d086b07">f32</a> *data, <a class="el" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6">s32</a> startRegister, <a class="el" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6">s32</a> constantAmount=1)=0
<dl class="el"><dd class="mdescRight">Sets a vertex shader constant.  <a href="#a1f11a6df7625205511e91fb036e03929"></a><br/></dl></ul>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Interface providing some methods for changing advanced, internal states of a <a class="el" href="classirr_1_1video_1_1_i_video_driver.html" title="Interface to driver which is able to perform 2d and 3d graphics functions.">IVideoDriver</a>. </p>

<p>Definition at line <a class="el" href="_i_material_renderer_services_8h_source.html#l00020">20</a> of file <a class="el" href="_i_material_renderer_services_8h_source.html">IMaterialRendererServices.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="abbab02366d5303f106d14278bf88aff3"></a><!-- doxytag: member="irr::video::IMaterialRendererServices::~IMaterialRendererServices" ref="abbab02366d5303f106d14278bf88aff3" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual irr::video::IMaterialRendererServices::~IMaterialRendererServices </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destructor. </p>

<p>Definition at line <a class="el" href="_i_material_renderer_services_8h_source.html#l00025">25</a> of file <a class="el" href="_i_material_renderer_services_8h_source.html">IMaterialRendererServices.h</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a2a80795887e43cb743eb5ee82604d4cf"></a><!-- doxytag: member="irr::video::IMaterialRendererServices::getVideoDriver" ref="a2a80795887e43cb743eb5ee82604d4cf" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classirr_1_1video_1_1_i_video_driver.html">IVideoDriver</a>* irr::video::IMaterialRendererServices::getVideoDriver </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get pointer to the <a class="el" href="classirr_1_1video_1_1_i_video_driver.html" title="Interface to driver which is able to perform 2d and 3d graphics functions.">IVideoDriver</a> interface. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Pointer to the <a class="el" href="classirr_1_1video_1_1_i_video_driver.html" title="Interface to driver which is able to perform 2d and 3d graphics functions.">IVideoDriver</a> interface </dd></dl>

</div>
</div>
<a class="anchor" id="ab000e24fe3f65fb63b007a37895df3f2"></a><!-- doxytag: member="irr::video::IMaterialRendererServices::setBasicRenderStates" ref="ab000e24fe3f65fb63b007a37895df3f2" args="(const SMaterial &amp;material, const SMaterial &amp;lastMaterial, bool resetAllRenderstates)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void irr::video::IMaterialRendererServices::setBasicRenderStates </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classirr_1_1video_1_1_s_material.html">SMaterial</a> &amp;&#160;</td>
          <td class="paramname"><em>material</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classirr_1_1video_1_1_s_material.html">SMaterial</a> &amp;&#160;</td>
          <td class="paramname"><em>lastMaterial</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>resetAllRenderstates</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Can be called by an <a class="el" href="classirr_1_1video_1_1_i_material_renderer.html" title="Interface for material rendering.">IMaterialRenderer</a> to make its work easier. </p>
<p>Sets all basic renderstates if needed. Basic render states are diffuse, ambient, specular, and emissive color, specular power, bilinear and trilinear filtering, wireframe mode, grouraudshading, lighting, zbuffer, zwriteenable, backfaceculling and fog enabling. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">material</td><td>The new material to be used. </td></tr>
    <tr><td class="paramname">lastMaterial</td><td>The material used until now. </td></tr>
    <tr><td class="paramname">resetAllRenderstates</td><td>Set to true if all renderstates should be set, regardless of their current state. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a6f612293300f643148bd537a8a70ff32"></a><!-- doxytag: member="irr::video::IMaterialRendererServices::setPixelShaderConstant" ref="a6f612293300f643148bd537a8a70ff32" args="(const c8 *name, const f32 *floats, int count)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool irr::video::IMaterialRendererServices::setPixelShaderConstant </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespaceirr.html#a9395eaea339bcb546b319e9c96bf7410">c8</a> *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="namespaceirr.html#a0277be98d67dc26ff93b1a6a1d086b07">f32</a> *&#160;</td>
          <td class="paramname"><em>floats</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets a constant for the pixel shader based on a name. </p>
<p>This can be used if you used a high level shader language like GLSL or HLSL to create a shader. See <a class="el" href="classirr_1_1video_1_1_i_material_renderer_services.html#a294db14b4f3608d29d0e457246df3d16" title="Sets a constant for the vertex shader based on a name.">setVertexShaderConstant()</a> for an example on how to use this. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>Name of the variable </td></tr>
    <tr><td class="paramname">floats</td><td>Pointer to array of floats </td></tr>
    <tr><td class="paramname">count</td><td>Amount of floats in array. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>True if successful. </dd></dl>

</div>
</div>
<a class="anchor" id="a252ccc1a6055f784c252435e1427de1b"></a><!-- doxytag: member="irr::video::IMaterialRendererServices::setPixelShaderConstant" ref="a252ccc1a6055f784c252435e1427de1b" args="(const c8 *name, const bool *bools, int count)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool irr::video::IMaterialRendererServices::setPixelShaderConstant </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespaceirr.html#a9395eaea339bcb546b319e9c96bf7410">c8</a> *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const bool *&#160;</td>
          <td class="paramname"><em>bools</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Bool interface for the above. </p>

</div>
</div>
<a class="anchor" id="ac81171c7c59a9cf0fc7d76de910098f4"></a><!-- doxytag: member="irr::video::IMaterialRendererServices::setPixelShaderConstant" ref="ac81171c7c59a9cf0fc7d76de910098f4" args="(const c8 *name, const s32 *ints, int count)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool irr::video::IMaterialRendererServices::setPixelShaderConstant </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespaceirr.html#a9395eaea339bcb546b319e9c96bf7410">c8</a> *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6">s32</a> *&#160;</td>
          <td class="paramname"><em>ints</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Int interface for the above. </p>

</div>
</div>
<a class="anchor" id="af962cb878f57d1edbc0030fedb464d1d"></a><!-- doxytag: member="irr::video::IMaterialRendererServices::setPixelShaderConstant" ref="af962cb878f57d1edbc0030fedb464d1d" args="(const f32 *data, s32 startRegister, s32 constantAmount=1)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void irr::video::IMaterialRendererServices::setPixelShaderConstant </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespaceirr.html#a0277be98d67dc26ff93b1a6a1d086b07">f32</a> *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6">s32</a>&#160;</td>
          <td class="paramname"><em>startRegister</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6">s32</a>&#160;</td>
          <td class="paramname"><em>constantAmount</em> = <code>1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets a pixel shader constant. </p>
<p>Can be used if you created a shader using pixel/vertex shader assembler or ARB_fragment_program or ARB_vertex_program. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>Data to be set in the constants </td></tr>
    <tr><td class="paramname">startRegister</td><td>First register to be set. </td></tr>
    <tr><td class="paramname">constantAmount</td><td>Amount of registers to be set. One register consists of 4 floats. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a294db14b4f3608d29d0e457246df3d16"></a><!-- doxytag: member="irr::video::IMaterialRendererServices::setVertexShaderConstant" ref="a294db14b4f3608d29d0e457246df3d16" args="(const c8 *name, const f32 *floats, int count)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool irr::video::IMaterialRendererServices::setVertexShaderConstant </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespaceirr.html#a9395eaea339bcb546b319e9c96bf7410">c8</a> *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="namespaceirr.html#a0277be98d67dc26ff93b1a6a1d086b07">f32</a> *&#160;</td>
          <td class="paramname"><em>floats</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets a constant for the vertex shader based on a name. </p>
<p>This can be used if you used a high level shader language like GLSL or HLSL to create a shader. Example: If you created a shader which has variables named 'mWorldViewProj' (containing the WorldViewProjection matrix) and another one named 'fTime' containing one float, you can set them in your <a class="el" href="classirr_1_1video_1_1_i_shader_constant_set_call_back.html" title="Interface making it possible to set constants for gpu programs every frame.">IShaderConstantSetCallBack</a> derived class like this: </p>
<div class="fragment"><pre class="fragment">    <span class="keyword">virtual</span> <span class="keywordtype">void</span> OnSetConstants(video::IMaterialRendererServices* services, <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> userData)
    {
        video::IVideoDriver* driver = services-&gt;getVideoDriver();

        <a class="code" href="namespaceirr.html#a0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a> time = (<a class="code" href="namespaceirr.html#a0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a>)os::Timer::getTime()/100000.0f;
        services-&gt;setVertexShaderConstant(<span class="stringliteral">&quot;fTime&quot;</span>, &amp;time, 1);

        <a class="code" href="namespaceirr_1_1core.html#a73fa92e638c5ca97efd72da307cc9b65" title="Typedef for f32 matrix.">core::matrix4</a> worldViewProj(driver-&gt;getTransform(<a class="code" href="namespaceirr_1_1video.html#a15b57657a320243be03ae6f66fcff43dae7ec186418508c67a7562af012d7b63f" title="Projection transformation.">video::ETS_PROJECTION</a>));
        worldViewProj *= driver-&gt;getTransform(<a class="code" href="namespaceirr_1_1video.html#a15b57657a320243be03ae6f66fcff43da152f4262d5874186e0288934c7d31e14" title="View transformation.">video::ETS_VIEW</a>);
        worldViewProj *= driver-&gt;getTransform(<a class="code" href="namespaceirr_1_1video.html#a15b57657a320243be03ae6f66fcff43da843cf42adb3fa9caf61c9e228cf14e85" title="World transformation.">video::ETS_WORLD</a>);
        services-&gt;setVertexShaderConstant(<span class="stringliteral">&quot;mWorldViewProj&quot;</span>, worldViewProj.M, 16);
    }
</pre></div> <dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>Name of the variable </td></tr>
    <tr><td class="paramname">floats</td><td>Pointer to array of floats </td></tr>
    <tr><td class="paramname">count</td><td>Amount of floats in array. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>True if successful. </dd></dl>

</div>
</div>
<a class="anchor" id="aed8c3f830451ec416265202d2dc90f92"></a><!-- doxytag: member="irr::video::IMaterialRendererServices::setVertexShaderConstant" ref="aed8c3f830451ec416265202d2dc90f92" args="(const c8 *name, const bool *bools, int count)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool irr::video::IMaterialRendererServices::setVertexShaderConstant </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespaceirr.html#a9395eaea339bcb546b319e9c96bf7410">c8</a> *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const bool *&#160;</td>
          <td class="paramname"><em>bools</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Bool interface for the above. </p>

</div>
</div>
<a class="anchor" id="a4dc7be8f9a786b9805c46f535ff7d896"></a><!-- doxytag: member="irr::video::IMaterialRendererServices::setVertexShaderConstant" ref="a4dc7be8f9a786b9805c46f535ff7d896" args="(const c8 *name, const s32 *ints, int count)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool irr::video::IMaterialRendererServices::setVertexShaderConstant </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespaceirr.html#a9395eaea339bcb546b319e9c96bf7410">c8</a> *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6">s32</a> *&#160;</td>
          <td class="paramname"><em>ints</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Int interface for the above. </p>

</div>
</div>
<a class="anchor" id="a1f11a6df7625205511e91fb036e03929"></a><!-- doxytag: member="irr::video::IMaterialRendererServices::setVertexShaderConstant" ref="a1f11a6df7625205511e91fb036e03929" args="(const f32 *data, s32 startRegister, s32 constantAmount=1)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void irr::video::IMaterialRendererServices::setVertexShaderConstant </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespaceirr.html#a0277be98d67dc26ff93b1a6a1d086b07">f32</a> *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6">s32</a>&#160;</td>
          <td class="paramname"><em>startRegister</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6">s32</a>&#160;</td>
          <td class="paramname"><em>constantAmount</em> = <code>1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets a vertex shader constant. </p>
<p>Can be used if you created a shader using pixel/vertex shader assembler or ARB_fragment_program or ARB_vertex_program. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">data,:</td><td>Data to be set in the constants </td></tr>
    <tr><td class="paramname">startRegister,:</td><td>First register to be set </td></tr>
    <tr><td class="paramname">constantAmount,:</td><td>Amount of registers to be set. One register consists of 4 floats. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="_i_material_renderer_services_8h_source.html">IMaterialRendererServices.h</a></li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespaceirr.html">irr</a>      </li>
      <li class="navelem"><a class="el" href="namespaceirr_1_1video.html">video</a>      </li>
      <li class="navelem"><a class="el" href="classirr_1_1video_1_1_i_material_renderer_services.html">IMaterialRendererServices</a>      </li>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


    <li class="footer">
<a href="http://irrlicht.sourceforge.net" target="_blank">Irrlicht 
Engine</a> Documentation &copy; 2003-2012 by Nikolaus Gebhardt. Generated on Sat Jul 9 2016 18:18:44 for Irrlicht 3D Engine by
<a href="http://www.doxygen.org/index.html" target="_blank">Doxygen</a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
